//
//  XHRSelectIllCategoryViewController.m
//  快医
//
//  Created by 胥鸿儒 on 16/7/7.
//
//

#import "XHRSelectIllCategoryViewController.h"

@interface XHRSelectIllCategoryViewController ()


@end

@implementation XHRSelectIllCategoryViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initSettings];
}
- (void)initSettings
{
    self.tableView.tableFooterView = [[UIView alloc]init];
}
#pragma mark - Table view data source

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.dataArray.count;;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *const selectIllCategoryID = @"selectIllCategoryID";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:selectIllCategoryID];
    if (!cell) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:selectIllCategoryID];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    cell.textLabel.text = self.dataArray[indexPath.row];
    return cell;
}
#pragma mark -
#pragma mark - tableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (self.selectIllCategoryViewBlock) {
        self.selectIllCategoryViewBlock(self.dataArray[indexPath.row]);
    }
    [self.navigationController popViewControllerAnimated:YES];
}
@end
